package com.itlong.cloud.dao;

import com.itlong.cloud.POJO.PO.DeviceBusinessChangeLogPO;
import com.itlong.cloud.POJO.VO.property.CloudIntercomDeviceVO;
import com.itlong.cloud.abstracts.IAbstractBaseDao;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <desc>
 *      设备硬件指令持久层对象
 * </desc>
 *
 * @createDate 2017/9/21
 */
@Mapper
@Repository
public interface ICloudIntercomOrdersDao extends IAbstractBaseDao<DeviceBusinessChangeLogPO> {

    /**
     * <desc>
     *     云对讲_批量保存设备端推送指令
     * </desc>
     * @param deviceBusinessChangeLogPOList
     * @return
     * @throws Exception
     * @author cuiduanwu
     * @createDate 2017-11-17
     */
    int saveDeviceBusinessChangeLogBatch(List<DeviceBusinessChangeLogPO> deviceBusinessChangeLogPOList);

    /**
     * <desc>
     *     根据房间ID查询对应的楼栋与单元ID
     * </desc>
     * @param roomId
     * @return
     * @author cuiduanwu
     * @createDate 2018-1-18
     */
    String deviceChangeLogGetBuildAndUnitIdByRoomId(@Param("roomId") String roomId);

    /**
     * <desc>
     *     根据sip帐号或获取设备唯一标识
     * </desc>
     * @param sipAccount sip帐号
     * @return
     * @author Qiang.S
     * @createDate 2018-09-12
     */
    CloudIntercomDeviceVO getDeviceUniqueBySip(@Param("sipAccount") String sipAccount);

    /**
     * <desc>
     *     根据设备编号查询设备系统
     * </desc>
     * @param deviceUnique 设备编号
     * @return
     * @author Qiang.S
     * @createDate 2018-09-12
     */
    String getSystemTypeByDeviceUnique(@Param("deviceUnique") String deviceUnique);
}
